package com.traffic.service.impl;

import com.traffic.domain.FamilyCriminal;
import com.traffic.mapper.FamilyCriminalMapper;
import com.traffic.service.IFamilyCriminalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 用户亲属犯罪信息Service业务层处理
 *
 * @author zzs
 * @date 2024-11-08
 */
@Service
public class FamilyCriminalServiceImpl implements IFamilyCriminalService
{
    @Autowired
    private FamilyCriminalMapper familyCriminalMapper;

    /**
     * 查询用户亲属犯罪信息
     *
     * @param id 用户亲属犯罪信息主键
     * @return 用户亲属犯罪信息
     */
    @Override
    public FamilyCriminal selectFamilyCriminalById(String id)
    {
        return familyCriminalMapper.selectFamilyCriminalById(id);
    }

    /**
     * 查询用户亲属犯罪信息列表
     *
     * @param familyCriminal 用户亲属犯罪信息
     * @return 用户亲属犯罪信息
     */
    @Override
    public List<FamilyCriminal> selectFamilyCriminalList(FamilyCriminal familyCriminal)
    {
        return familyCriminalMapper.selectFamilyCriminalList(familyCriminal);
    }

    /**
     * 新增用户亲属犯罪信息
     *
     * @param familyCriminal 用户亲属犯罪信息
     * @return 结果
     */
    @Override
    public int insertFamilyCriminal(FamilyCriminal familyCriminal)
    {
        return familyCriminalMapper.insertFamilyCriminal(familyCriminal);
    }

    /**
     * 修改用户亲属犯罪信息
     *
     * @param familyCriminal 用户亲属犯罪信息
     * @return 结果
     */
    @Override
    public int updateFamilyCriminal(FamilyCriminal familyCriminal)
    {
        return familyCriminalMapper.updateFamilyCriminal(familyCriminal);
    }

    /**
     * 批量删除用户亲属犯罪信息
     *
     * @param ids 需要删除的用户亲属犯罪信息主键
     * @return 结果
     */
    @Override
    public int deleteFamilyCriminalByIds(String[] ids)
    {
        return familyCriminalMapper.deleteFamilyCriminalByIds(ids);
    }

    /**
     * 删除用户亲属犯罪信息信息
     *
     * @param id 用户亲属犯罪信息主键
     * @return 结果
     */
    @Override
    public int deleteFamilyCriminalById(String id)
    {
        return familyCriminalMapper.deleteFamilyCriminalById(id);
    }
}
